package com.hyt.it.ogt.kq.service.bm.service;

import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hyt.it.ogt.kq.service.bm.model.entity.Order;
import com.hyt.it.ogt.kq.service.bm.model.entity.OrderListVo;
import com.hyt.it.ogt.kq.service.bm.model.entity.Project;
import com.hyt.it.ogt.kq.service.bm.model.entity.StudentSubject;
import com.hyt.it.ogt.kq.service.bm.model.param.PayOrderListOrderParam;
import com.hyt.it.ogt.kq.service.bm.model.param.PayOrderRefundOrderListParam;
import com.hyt.it.ogt.kq.service.bm.model.vo.OrderInfoVo;
import com.hyt.it.ogt.kq.service.bm.model.vo.OrderParam;
import com.hyt.it.ogt.kq.service.bm.model.vo.PayOrderProject;
import com.hyt.it.ogt.kq.service.bm.model.vo.ProjectOrderFlowVo;
import com.hyt.it.ogt.kq.service.bm.model.vo.Reconciliation;
import com.hyt.it.ogt.kq.service.bm.model.vo.ReconciliationList;
import com.hyt.it.ogt.kq.service.bm.model.vo.RefundComments;
import com.hyt.it.ogt.kq.service.bm.model.vo.RefundTaskList;
import com.hyt.it.ogt.kq.service.bm.model.vo.StudentSubjectVo;
import com.hyt.model.PageParam;

public interface IPayOrderService extends IService<Order> {

	IPage<PayOrderProject> queryProjectList(PageParam<PayOrderProject> pageParam, OrderParam param,String officeId);

	IPage<OrderListVo> querylistOrder(PayOrderListOrderParam pageParam);

	boolean refundManage(String orderId,String subjectIds) ;

	OrderInfoVo queryOrderInfo(String orderId);

	List<StudentSubject> refundSubjectList(String orderId);
	
	/***
	 * 根据项目id查询可退款科目
	 * @param projectId  项目id
	 * @param studentId  考生id
	 * @return 可退费列表
	 */
	List<StudentSubjectVo> queryRefundSubjectListByProjectId(String projectId, String studentId);
	
	int applyForRefund(String orderId, String subjectIds, String regId, String projectId);
	
	int applyForRefundBySubjects(String subjectIds, String regId, String projectId);
	
	List<ProjectOrderFlowVo> queryProjectOrderFlowList(String projectId, String regId);

	String refundComments(RefundComments refundComments) throws Exception;

	Map<String, Object> refundNotifyUrl(HttpServletRequest req, String officeId,String id);

	IPage<OrderListVo> refundOrderList(PayOrderRefundOrderListParam pageParam);

	IPage<RefundTaskList> refundTaskList(PageParam<RefundTaskList> pageParam, OrderParam param,String officeId);

	List<StudentSubject> refundSubjectListDetail(String orderId);
	
	List<StudentSubject> refundSubjectListDetail(String orderId, String refundOrderId);

	IPage<Reconciliation> officeReconciliation(PageParam<Reconciliation> pageParam, String officeName);

	List<Project> officeProjectList(String officeId);

	IPage<ReconciliationList> officeReconciliationList(PageParam<ReconciliationList> pageParam, String orderId,
			String projectId, String date, String orderType, String payType,String officeId);
	
	// 易宝退款回调
	Map<String, Object> yopRrefundNotifyUrl(String customerIdentification, String orderJson, String id) throws Exception;

	/***
	 * 解析易宝支付回调数据
	 * @param response
	 * @return
	 */

	String analysisYopNotifyStr(String response, String officeId) throws Exception ;
	
	/***
	 * 根据项目Id和用户Id以及支付状态获取订单列表
	 * @param projectId
	 * @param regId
	 * @param payStatus
	 * @return
	 */
	List<Order> getOrderListsByProIdAndRegId(String projectId, String regId, List<String> payStatus);
	
	 /***
     * 解析易宝支付回调数据
     * @param response
     * @return
     */

    String getNcNonTaxPayPrivateKey(String officeId) throws Exception ;
	
}
